﻿using System.Collections.Generic;
using Web7.Mvc.ViewEngines;

namespace Web7.Core.ViewResolvers
{
    /// <summary>
    /// 视图解析器表
    /// </summary>
    public interface IViewResolverRegistry
    {
        /// <summary>
        /// 默认视图解析器
        /// </summary>
        IViewResolver Default { get; set; }
        /// <summary>
        /// 添加视图解析器
        /// </summary>
        /// <param name="viewResolver">视图解析器</param>
        void Add(IViewResolver viewResolver);
        /// <summary>
        /// 生成视图引擎
        /// </summary>
        /// <param name="viewResolverContext">视图解析器上下文</param>
        /// <returns></returns>
        IEnumerable<IWeb7ViewEngine> GenerateViewEngines(ViewResolverContext context);
    }
}
